name: "CodeQL"
on:
  workflow_dispatch: {}
  schedule:
    - cron: '35 3 * * *'
permissions:
  contents: read
jobs:
  analyze:
    timeout-minutes: 30
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write
    strategy:
      fail-fast: false
      matrix:
        language: ['go']
    steps:
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
      - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
        with:
          go-version-file: go.mod
      - name: Initialize CodeQL
        uses: github/codeql-action/init@379614612a29c9e28f31f39a59013eb8012a51f0 # v3.24.3
        with:
          config-file: ./.github/codeql/codeql-config.yml
          languages: ${{ matrix.language }}
      - name: Autobuild
        uses: github/codeql-action/autobuild@379614612a29c9e28f31f39a59013eb8012a51f0 # v3.24.3
      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@379614612a29c9e28f31f39a59013eb8012a51f0 # v3.24.3
        with:
          category: "/language:${{matrix.language}}"
